<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 - 易买网</title>
<link type="text/css" rel="stylesheet"
	href="<%=path%>/resources/css/style.css" />
<script type="text/javascript"
	src="<%=path%>/resources/scripts/function-manage.js"></script>
</head>
<body>
	<div id="header" class="wrap">
	<div id="logo"><img src="<%=path %>/resources/images/logo.gif" /></div>
	<div class="help"><a href="<%=path %>/main/index">返回前台页面</a></div>
		<div class="navbar">
			<ul class="clearfix">
			<li><a href="<%=path %>/manage">首页</a></li>
			<li><a href="<%=path%>/user/list">用户</a></li>
			<li class="current"><a href="<%=path%>/product/list">商品</a></li>
			<li><a href="<%=path%>/order/list">订单</a></li>
			<li><a href="<%=path %>/notice/notices">公告</a></li>
			<li><a href="<%=path %>/news/news">新闻</a></li>
			</ul>
		</div>
	</div>
	<div id="childNav">
		<div class="welcome wrap">管理员admin您好，今天是<%=new Date().toString() %>，欢迎回到管理后台。</div>
	</div>
	<div id="position" class="wrap">
		您现在的位置：<a href="<%=path %>/main/index">易买网</a> &gt; 管理后台
	</div>
	<div id="main" class="wrap">
		<div id="menu-mng" class="lefter">
			<div class="box">
				<dl>
				<dt>用户管理</dt>
				<dd><em><a href="<%=path%>/user/add">新增</a></em><a href="<%=path%>/user/list">用户管理</a></dd>
				<dt>商品信息</dt>
				<dd><em><a href="<%=path%>/category/add">新增</a></em><a href="<%=path%>/category/list">分类管理</a></dd>
				<dd><em><a href="<%=path%>/product/add">新增</a></em><a href="<%=path%>/product/list">商品管理</a></dd>
				<dt>订单管理</dt>
				<dd><a href="<%=path%>/order/list">订单管理</a></dd>
				<dt>公告管理</dt>
				<dd><em><a href="<%=path%>/notice/add">新增</a></em><a href="<%=path %>/notice/notices">公告管理</a></dd>
				<dt>新闻管理</dt>
				<dd><em><a href="<%=path%>/news/add">新增</a></em><a href="<%=path %>/news/news">新闻管理</a></dd>
				</dl>
			</div>
		</div>
		<div class="main">
			<h2>添加商品</h2>
			<div class="manage">
				<form action="<%=path%>/product/add" method="post"  enctype="multipart/form-data">
					<table class="form">
						<tr>
							<td class="field">商品名称：</td>
							<td><input type="text" class="text" name="epName"
								value="" /></td>
						</tr>
						<tr>
							<td class="field">所属分类：</td>
							<td><select name="epcId">
									<c:forEach var="procat" items="${gradeList }">
										<c:forEach var="navMap" items="${catMap }">
											<c:choose>
												<c:when test="${navMap.key.id== procat.id}">
													<option value="${navMap.key.id }">${procat.name }</option>
													<c:set value="${navMap.value }" var="subItem" />
													<c:forEach items="${subItem }" var="var">
														<option value="${var.id }">├ ${var.name }</option>
													</c:forEach>
												</c:when>
												<c:otherwise>
												</c:otherwise>
											</c:choose>
										</c:forEach>
									</c:forEach>
							</select></td>
						</tr>
						<tr>
							<td class="field">商品图片：</td>
							<td><input type="file" class="text" name="cover" /></td>
						</tr>
						<tr>
							<td class="field">商品价格：</td>
							<td><input type="text" class="text tiny" name="price" />
								元</td>
						</tr>
						<tr>
							<td class="field">描述：</td>
							<td><input type="text" class="text" name="description" /></td>
						</tr>
						<tr>
							<td class="field">库存：</td>
							<td><input type="text" class="text tiny" name="stock" /></td>
						</tr>
						<tr>
							<td></td>
							<td><label class="ui-blue"><input type="submit"
									name="submit" value="添加" /></label></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
		<div id="footer">Copyright &copy; 2017 爱苗科技 All Rights Reserved.
			皖ICP证000001号</div>
</body>
</html>